package pojo;

import java.time.LocalDateTime;

/**
 * 急救知识表实体类
 */
public class Jjzs {
    private Integer id;           // 急救知识ID
    private String title;         // 标题
    private String content;       // 内容
    private String imageUrl;      // 图片URL
    private Integer viewCount;    // 访问量
    private LocalDateTime createTime; // 创建时间

    // Getter 和 Setter 方法
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }

    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }

    public String getContent() { return content; }
    public void setContent(String content) { this.content = content; }

    public String getImageUrl() { return imageUrl; }
    public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; }

    public Integer getViewCount() {
        return viewCount != null ? viewCount : 0;
    }
    public void setViewCount(Integer viewCount) { this.viewCount = viewCount; }

    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    @Override
    public String toString() {
        return "Jjzs{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                ", viewCount=" + viewCount +
                ", createTime=" + createTime +
                '}';
    }
}